<?php
   global $objDbSelect,$arrdetail,$sLang;
   echo '<pre>'; print_r($_POST); die();
    include_once("excel/class/Writer.php");

    $workbook = new Spreadsheet_Excel_Writer();

    $workbook->setVersion(8, 'utf-8');

    // Style
    $format_bold =& $workbook->addFormat(array('Bold' => true));
    $format_bold_center =& $workbook->addFormat(array('Bold' => true,'Align' => 'center'));
    $format_tbl_header =& $workbook->addFormat(array('Bold' => true, 'Align' => 'center', 'BgColor' => 'gray', 'Border' => '1px'));
    $format_border =& $workbook->addFormat(array('Border' => '1px'));
    $format_border_center =& $workbook->addFormat(array('Border' => '1px', 'Align' => 'center'));
    $format_search_label =& $workbook->addFormat(array('Bold' => true, 'Align' => 'right'));
    $format_group =& $workbook->addFormat(array('Bold' => true, 'Border' => '1px'));
    $format_border_right =& $workbook->addFormat(array('Border' => '1px', 'Align' => 'right'));
    $format_bold_left =& $workbook->addFormat(array('Bold' => true, 'Align' => 'left'));
    $format_right =& $workbook->addFormat(array('Align' => 'right'));
    $format_center =& $workbook->addFormat(array('Align' => 'center'));
    $format_border_bold =& $workbook->addFormat(array('Border' => '1px','Bold' => true));      
    $cell =& $workbook->addFormat();
    $cell->setTextWrap();

    $worksheet =& $workbook->addWorksheet();
    $worksheet->setInputEncoding('utf-8');

    // Row Index
    $iRowIndex = 0;
    $iRowSum = 0;
    // Title
    $worksheet->setMerge($iRowIndex, 1, 0, 4);
    $worksheet->writeString($iRowIndex, 1,'STOPPING_GENERAL_REPORT_TITLE', $format_bold_center);

   
    $worksheet->writeString($iRowIndex, 1, "1234:", $format_search_label); //phuong tien 
    $worksheet->writeString($iRowIndex, 2, '4444444', $format_bold);
    //file to client
    $sCurrDate = date('His');
    $sFile ='baocaoxxxx_'.$sCurrDate.'.xls';
    $workbook->send($sFile);
    $workbook->close();
?>
